inspector/graphdata.c \
inspector/init.c \
inspector/inspect-button.c \
+ inspector/magnifier.c \
inspector/menu.c \
inspector/misc-info.c \
inspector/object-hierarchy.c \
inspector/gestures.h \
inspector/graphdata.h \
inspector/init.h \
+ inspector/magnifier.h \
inspector/menu.h \
inspector/misc-info.h \
inspector/object-hierarchy.h \
inspector/css-editor.ui \
inspector/data-list.ui \
inspector/general.ui \
+ inspector/magnifier.ui \
inspector/menu.ui \
inspector/misc-info.ui \
inspector/object-hierarchy.ui \
#include "general.h"
#include "gestures.h"
#include "graphdata.h"
+#include "magnifier.h"
#include "menu.h"
#include "misc-info.h"
#include "object-hierarchy.h"
#include "visual.h"
#include "window.h"
+#include "gtkmagnifierprivate.h"
+
#include "gtkmodulesprivate.h"
void
g_type_ensure (GTK_TYPE_INSPECTOR_DATA_LIST);
g_type_ensure (GTK_TYPE_INSPECTOR_GENERAL);
g_type_ensure (GTK_TYPE_INSPECTOR_GESTURES);
+ g_type_ensure (GTK_TYPE_MAGNIFIER);
+ g_type_ensure (GTK_TYPE_INSPECTOR_MAGNIFIER);
g_type_ensure (GTK_TYPE_INSPECTOR_MENU);
g_type_ensure (GTK_TYPE_INSPECTOR_MISC_INFO);
g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY);
--- /dev/null
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+
+#include "magnifier.h"
+
+#include "gtkmagnifierprivate.h"
+
+#include "gtklabel.h"
+
+
+struct _GtkInspectorMagnifierPrivate
+{
+ GtkWidget *object;
+ GtkWidget *magnifier;
+ GtkWidget *object_title;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorMagnifier, gtk_inspector_magnifier, GTK_TYPE_BOX)
+
+static void
+gtk_inspector_magnifier_init (GtkInspectorMagnifier *sl)
+{
+ sl->priv = gtk_inspector_magnifier_get_instance_private (sl);
+ gtk_widget_init_template (GTK_WIDGET (sl));
+}
+
+void
+gtk_inspector_magnifier_set_object (GtkInspectorMagnifier *sl,
+ GObject *object)
+{
+ const gchar *title;
+
+ sl->priv->object = NULL;
+
+ if (!GTK_IS_WIDGET (object))
+ {
+ gtk_widget_hide (GTK_WIDGET (sl));
+ _gtk_magnifier_set_inspected (GTK_MAGNIFIER (sl->priv->magnifier), NULL);
+ return;
+ }
+
+ title = (const gchar *)g_object_get_data (object, "gtk-inspector-object-title");
+ gtk_label_set_label (GTK_LABEL (sl->priv->object_title), title);
+
+ gtk_widget_show (GTK_WIDGET (sl));
+
+ sl->priv->object = GTK_WIDGET (object);
+
+ _gtk_magnifier_set_inspected (GTK_MAGNIFIER (sl->priv->magnifier), GTK_WIDGET (object));
+ _gtk_magnifier_set_coords (GTK_MAGNIFIER (sl->priv->magnifier), 0, 0);
+}
+
+static void
+gtk_inspector_magnifier_class_init (GtkInspectorMagnifierClass *klass)
+{
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/magnifier.ui");
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMagnifier, magnifier);
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMagnifier, object_title);
+}
+
+// vim: set et sw=2 ts=2:
--- /dev/null
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _GTK_INSPECTOR_MAGNIFIER_H_
+#define _GTK_INSPECTOR_MAGNIFIER_H_
+
+#include <gtk/gtkbox.h>
+
+#define GTK_TYPE_INSPECTOR_MAGNIFIER (gtk_inspector_magnifier_get_type())
+#define GTK_INSPECTOR_MAGNIFIER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INSPECTOR_MAGNIFIER, GtkInspectorMagnifier))
+#define GTK_INSPECTOR_MAGNIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_INSPECTOR_MAGNIFIER, GtkInspectorMagnifierClass))
+#define GTK_INSPECTOR_IS_MAGNIFIER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_INSPECTOR_MAGNIFIER))
+#define GTK_INSPECTOR_IS_MAGNIFIER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_INSPECTOR_MAGNIFIER))
+#define GTK_INSPECTOR_MAGNIFIER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_INSPECTOR_MAGNIFIER, GtkInspectorMagnifierClass))
+
+
+typedef struct _GtkInspectorMagnifierPrivate GtkInspectorMagnifierPrivate;
+
+typedef struct _GtkInspectorMagnifier
+{
+ GtkBox parent;
+ GtkInspectorMagnifierPrivate *priv;
+} GtkInspectorMagnifier;
+
+typedef struct _GtkInspectorMagnifierClass
+{
+ GtkBoxClass parent;
+} GtkInspectorMagnifierClass;
+
+G_BEGIN_DECLS
+
+GType gtk_inspector_magnifier_get_type (void);
+void gtk_inspector_magnifier_set_object (GtkInspectorMagnifier *sl,
+ GObject *object);
+
+G_END_DECLS
+
+#endif // _GTK_INSPECTOR_MAGNIFIER_H_
+
+// vim: set et sw=2 ts=2:
#include "menu.h"
#include "misc-info.h"
#include "gestures.h"
+#include "magnifier.h"
#include "gtklabel.h"
#include "gtkbutton.h"
gtk_inspector_actions_set_object (GTK_INSPECTOR_ACTIONS (iw->actions), selected);
gtk_inspector_menu_set_object (GTK_INSPECTOR_MENU (iw->menu), selected);
gtk_inspector_gestures_set_object (GTK_INSPECTOR_GESTURES (iw->gestures), selected);
+ gtk_inspector_magnifier_set_object (GTK_INSPECTOR_MAGNIFIER (iw->magnifier), selected);
for (l = iw->extra_pages; l != NULL; l = l->next)
g_object_set (l->data, "object", selected, NULL);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, menu);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, misc_info);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, gestures);
+ gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, magnifier);
gtk_widget_class_bind_template_callback (widget_class, gtk_inspector_on_inspect);
gtk_widget_class_bind_template_callback (widget_class, on_object_activated);
GtkWidget *menu;
GtkWidget *misc_info;
GtkWidget *gestures;
+ GtkWidget *magnifier;
GtkWidget *invisible;
GtkWidget *selected_widget;
void gtk_inspector_window_select_widget_under_pointer (GtkInspectorWindow *iw);
-
G_END_DECLS
<property name="title" translatable="yes">Gestures</property>
</packing>
</child>
+ <child>
+ <object class="GtkInspectorMagnifier" id="magnifier">
+ </object>
+ <packing>
+ <property name="name">magnifier</property>
+ <property name="title" translatable="yes">Magnifier</property>
+ </packing>
+ </child>
</object>
</child>
</object>
N_("Actions");
N_("Menu");
N_("Gestures");
+N_("Magnifier");
N_("Objects");
N_("Statistics");
N_("Resources");
gtk/inspector/gestures.c
gtk/inspector/inspect-button.c
gtk/inspector/menu.c
+gtk/inspector/magnifier.ui.h
gtk/inspector/menu.ui.h
gtk/inspector/misc-info.c
gtk/inspector/misc-info.ui.h